package com.wctj.api.business.common.service.impl;

import com.baomidou.mybatisplus.extension.conditions.query.LambdaQueryChainWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.wctj.api.base.entity.DdwxCorpMemberInfo;
import com.wctj.api.business.common.dao.DdwxCorpMemberInfoMapper;
import com.wctj.api.business.common.service.DdwxCorpMemberInfoService;
import org.springframework.stereotype.Service;

@Service
public class DdwxCorpMemberInfoServiceImpl extends ServiceImpl<DdwxCorpMemberInfoMapper, DdwxCorpMemberInfo> implements DdwxCorpMemberInfoService {

    @Override
    public int existsByMemberId(String memberId) {

        return new LambdaQueryChainWrapper<>(baseMapper)
                .eq(DdwxCorpMemberInfo::getMemberId,memberId)
                .count().intValue();
    }

}
